
import Layout from '@/layout'
import { roterPre } from '@/settings'
const supplierRouter =
  {
    path: `${roterPre}/supplier`,
    name: 'supplier',
    meta: {
      title: '供应商'
    },
    alwaysShow: true,
    component: Layout,
    redirect: 'noRedirect',
    children: [
      {
        path: 'supplier',
        name: 'supplier',
        meta: {
          title: '进货单管理',
          noCache: true
        },
        redirect: 'noRedirect',
        component: () => import('@/views/supplier/supplier/index'),
        children: [
          {
            path: 'supplier_add',
            name: `supplierAdd`,
            meta: {
              title: '进货单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_add/index')
          },
          {
            path: 'create/:id?/:edit?',
            name: `supplierAddCreate`,
            meta: {
              title: '添加进货单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_add/create')
          }
        ]
      },
      {
        path: 'refund',
        name: 'refund',
        meta: {
          title: '退货单管理',
          noCache: true
        },
        redirect: 'noRedirect',
        component: () => import('@/views/supplier/supplier/index'),
        children: [
          {
            path: 'index',
            name: `supplierRefundIndex`,
            meta: {
              title: '退货单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_refund/index')
          },
          {
            path: 'create/:id?/:edit?',
            name: `supplierRefundCreate`,
            meta: {
              title: '添加退货单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_refund/create')
          }
        ]
      },
      {
        path: 'stock',
        name: 'stock',
        meta: {
          title: '库存管理',
          noCache: true
        },
        redirect: 'noRedirect',
        component: () => import('@/views/supplier/supplier/index'),
        children: [
          {
            path: 'lst',
            name: `supplierStockLst`,
            meta: {
              title: '库存列表',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_stock/lst')
          },
          {
            path: 'index',
            name: `supplierStockIndex`,
            meta: {
              title: '盘点单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_stock/index')
          },
          {
            path: 'create/:id?/:edit?',
            name: `supplierStockCreate`,
            meta: {
              title: '添加盘点单',
              noCache: true
            },
            component: () => import('@/views/supplier/supplier/supplier_stock/create')
          }
        ]
      }
    ]
  }

export default supplierRouter
